package no.ntnu.idi.deid.statistical.tfidf;

import java.io.IOException;
import no.ntnu.idi.deid.config.FilePaths;
import no.ntnu.idi.deid.preprocessor.Documents;

import org.annolab.tt4j.TreeTaggerException;

public class CorpusFileGenerator {
	
	public static void main(String[] args) {
		Documents documents = null;
		try {
			System.out.println("Starting documentPreProcessor..");
			documents = new Documents();
			System.out.println("Finished preprocessing "+ documents.getDocuments().size() + " documents");
			
		} catch (IOException e) {
			e.printStackTrace();
			System.exit(0);
		} catch (TreeTaggerException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		DocumentFrequencyMain documentFrequencyMain = new DocumentFrequencyMain(documents);
		documentFrequencyMain.generateSentenceDocumentFrequencyStats(FilePaths.getSentenceIDFDatabase());
		documentFrequencyMain.generateTokenDocumentFrequencyStats(FilePaths.getTokenIDFDatabase());		
	}

}
